<extend name="Public/base"/>
<block name="body">
<style type="text/css">
	.list_image{
		max-width: 30px;
		max-height: 30px;
	}
</style>
	<div class="main-title">
		<h2>企业列表</h2>
	</div>
	<div class="data-table table-striped">
		<table>
			<thead>
				<tr>
		            <th>ID</th>
		            <th>名称</th>
		            <th>联系电话</th>
		            <th>联系人</th>
		            <th>地区</th>
		            <th>执照</th>
		            <th>状态</th>
		            <th>操作</th>
				</tr>
			</thead>
			<tbody>
				<notempty name="_list">
				<volist name="_list" id="vo">
		          <tr>
		          	<td>{$vo.id}</td>
		            <td>{$vo.company}</td>
		            <td>{$vo.phone}</td>
		            <td>{$vo.name}</td>
		            <td>{$vo.region}</td>
		            <td><a href="__ROOT__{$vo.license}" title="查看大图" target="_blank"><img class="list_image" src="__ROOT__{$vo.license}"></a></td>
		            <td><if condition="$vo.type eq 0">未审核<elseif condition='$vo.type eq 1' />已通过<else />已拒绝</if></td>
		            <td>
		              <a href='{:U("settype",array("id"=>$vo["id"],"type"=>1))}'>通过</a>
		              <a href='{:U("settype",array("id"=>$vo["id"],"type"=>2))}'>不通过</a>
		              <a href='{:U("worklist",array("id"=>$vo["id"]))}'>职位</a>
		            </td>
		          </tr>
				</volist>
				<else/>
				<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
			</tbody>
		</table>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
<script type="text/javascript">
    $(function() {
    	//点击排序
    	$('.list_sort').click(function(){
    		var url = $(this).attr('url');
    		var ids = $('.ids:checked');
    		var param = '';
    		if(ids.length > 0){
    			var str = new Array();
    			ids.each(function(){
    				str.push($(this).val());
    			});
    			param = str.join(',');
    		}

    		if(url != undefined && url != ''){
    			window.location.href = url + '/ids/' + param;
    		}
    	});
    });
</script>
</block>